﻿<?php include('app/admin/welcome/html/meta.html');?>
<?php include('app/admin/welcome/html/header.html');?>
<?php include('app/admin/welcome/html/menu.html');?>

<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> <a href="index.php?a=admin&b=welcome&c=index">首页</a>
		<span class="c-gray en">&gt;</span>
		新闻分类列表
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
				<a class="btn btn-primary radius" data-title="添加资讯" href="index.php?a=admin&b=newscate&c=add" ><i class="Hui-iconfont">&#xe600;</i> 添加分类</a>
				</span>
				<span class="r">共有数据：<strong>54</strong> 条</span>
			</div>
			<div class="mt-20">
				<table class="table table-border table-bordered table-bg table-hover table-sort">
					<thead>
						<tr class="text-c">
							<th width="25"><input type="checkbox" name="" value=""></th>
							<th width="80">ID</th>
							<th width="80">新闻类型</th>
							<th width="120">操作</th>
						</tr>
					</thead>
					<tbody id="tbody">
						<?php foreach($news as $k=>$v){?>
						<tr class="text-c">
							<td><input type="checkbox" value="" name=""></td>
							<td><?php echo $v['Id']?></td>
							<td><?php echo $v['name'];?></td>
							<td class="f-14 td-manage">
								<a style="text-decoration:none" class="ml-5" href="index.php?a=admin&b=newscate&c=update&id=<?php echo $v['Id']?>" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a>
								<a id="delete" style="text-decoration:none" deleteid='<?php echo $v['Id'];?>' class="ml-5 delete" href="index.php?a=admin&b=newscate&c=delete&id=<?php echo $v['Id'];?>" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
							</td>
						</tr>
						<?php }?>
					</tbody>
				</table>
				<div style="float: right;margin-top: 8px;">
					<?php echo $str;?>
				</div>
			</div>
		</article>
	</div>
</section>


<?php include('app/admin/welcome/html/footer.html');?>

<!--请在下方写此页面业务相关的脚本-->
<script>
	
	$(document).on('click','.pageclick',function(){
		var urls = $(this).attr('href');
		$.get(urls,function(date){
			var table = date.table;
			var str = '';
			$.each(date.table,function(key,value){
				str += '<tr class="text-c">';
				str += '<td><input type="checkbox" value="" name=""></td>';
				str += '<td>'+ value.Id +'</td>';
				str += '<td>'+ value.name +'</td>';
				str += "<td class='f-14 td-manage'>";
				str += "<a style='text-decoration:none' class='ml-5' href='index.php?a=admin&b=newscate&c=update&id="+ value.Id +"' title='编辑'><i class='Hui-iconfont'>&#xe6df;</i></a>";
				str += "<a style='text-decoration:none' class='ml-5 delete' href='index.php?a=admin&b=newscate&c=delete&id="+ value.Id +"' title='删除'><i class='Hui-iconfont'>&#xe6e2;</i></a></td>";
				str += "</tr>";
			})
			
			$('#tbody').html(str);
			var render = date.render;
			$('#render').html(render);
		},'json')
		return false;
	})
	
	
	
</script>
<!--/请在上方写此页面业务相关的脚本-->

</body>
</html>